﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace DistributeTransaction.Models
{
    public class OrderSummary
    {
        [Key]
        public int OrderID { get; set; }

        [Display(Name = "Shipped Date")]
        [DisplayFormat(DataFormatString="{0:D}")]
        public DateTime? ShippedDate { get; set; }

        [Display(Name = "Ship Name")]
        [Required(ErrorMessage = "Please input Ship Name")]
        [StringLength(40)]
        public string ShipName { get; set; }

        [Display(Name = "Ship Address")]
        [Required(ErrorMessage = "Please input Ship Address")]
        [StringLength(60)]
        public string ShipAddress { get; set; }

        [Display(Name = "Ship City")]
        [Required(ErrorMessage = "Please input Ship City")]
        [StringLength(15)]
        public string ShipCity { get; set; }

        [Display(Name = "Postal Code")]
        [StringLength(6)]
        [Required(ErrorMessage = "Please input Postal Code")]
        public string ShipPostalCode { get; set; }

        [Display(Name = "Ship Country")]
        [Required(ErrorMessage = "Please input Ship Country")]
        [StringLength(15)]
        public string ShipCountry { get; set; }

        [Display(Name = "Freight")]
        //[DisplayFormat(DataFormatString = "{0:#,###.00}")]
        public decimal? Freight { get; set; }

        public IEnumerable<OrderDetail> details
        {
            get;
            set;
        }

        public IEnumerable<Payment> Payments
        {
            get;
            set;
        }

    }
}